package chapter9;

import java.util.Objects;

/**
 * Created by Caesar on 2015/11/23.
 */
public class ReverseProcessor {
    public static void main(String[] args) {
        String s = "asdfghjkl";
        Apply.process(new ReverseAdapter(new Reverse()),s);
    }
}

class ReverseAdapter implements Processor{
    Reverse re ;
    public ReverseAdapter(Reverse re){
        this.re = re;
    }

    public String name(){
        return re.name();
    }

    public String reverse(Object input){
        return re.reverse((String)input);
    }
}
